<?php 
session_start();
$id=$_SESSION['id'];
include_once('msg.php');
$msg=new Msg();
include_once('db.php');
$db=new DB();
$sql = "select * from manager where id = $id";
$res1=$db->get($sql);

if (isset($_POST['submit'])) 
{       
		$data['id'] =$id;
		$data['email'] = $_POST['email'];
		$data['maname'] = $_POST['maname'];
		$data['password'] = $_POST['password'];
		if($msg->updateMsg($data))
		{
			echo "修改成功！";;
		}
		else{
			exit("修改失败");
		}
		
	} 
?>
 <!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="UTF-8">
	<link href="bootstrap.min.css" rel="stylesheet">
<script src="jquery.min.js"></script>
<script src="bootstrap.min.js"></script>
<meta name="viewport" content=" width=device-width,initial-scale=1.0">
</head>
<body>
	<div class="container">
		<div class="public-nav">您当前的位置：<a href="">管理员管理</a></div>
		<div class="public-content">
			<div class="public-content-header">
				<h3>个人信息管理</h3>
			</div>
			<div class="row clearfix">
				<div class="col-md-12 column">
<form method="post" action="admin_modify.php">
<table width="600" border="1" class="table table-bordered">
		<tr>
		<td  class="active">ID</td>
		<td class="success" name="id"><?php echo $res1[0][0];?></td>
		</tr>
		<tr>
		<td  class="active">名称</td>
		<td class="success"><input type="text" name="maname" value="<?php echo $res1[0][1];?>"></td>
		</tr>
		<tr>
		<td  class="active">密码</td>
		<td class="success"><input type="text" name="password" value="<?php echo $res1[0][2];?>"></td>
		</tr>
        <tr>
		<td  class="active">邮箱</td>
		<td class="success"><input type="text" name="email" value="<?php echo $res1[0][3];?>"></td>
		</tr>
		<tr>
		<td  class="active">注册时间</td>
		<td class="success"><?php echo $res1[0][4];?></td>
		</tr>
		<tr>
		<td class="active"></td>
		<td class="sucess"><input type="submit" name="submit" value="提交"></td>
		</tr>		
	</table> 
	</form>
	</div>
	</div>
	</div>
</body>
</html>	
	